Skip to content

ci(codecov): pin the coverage bar at 80% - #17

Merged
daniboybye merged 1 commit into
masterfrom
ci/codecov-80
Aug 28, 2026
Merged

ci(codecov): pin the coverage bar at 80%#17
daniboybye merged 1 commit into
masterfrom
ci/codecov-80

Conversation

@daniboybye

Copy link
Copy Markdown
Owner

Makes 80% the coverage bar a commit has to clear, for the diff and for the project.

Why

Codecov's default target is auto — the project's own current coverage. So a commit is red unless its diff is covered at least as well as the whole tree already is. PR #16 (release 0.6.6) failed exactly that way:

codecov/patch88.07% of diff hit (target 91.13%)

Nothing was wrong with that patch. An auto target also ratchets: every commit that nudges coverage up raises the bar for the next one, until ordinary changes go red for no reason anyone can act on.

What changed

A codecov.yml pinning both statuses to a fixed 80%:

coverage:
  status:
    project:
      default:
        target: 80%
    patch:
      default:
        target: 80%

The tree is at 91.2%, so this is headroom, not a loosened gate — it stops the bar from chasing the tree.

Validation

  • codecov.yml accepted by https://codecov.io/validate ("Valid!", target parsed as 80.0).
  • All 12 locally-reproducible gates from .github/workflows/build-and-publish.yml green before push: deps lock, unused lock, hex.audit, format, property deps, compile ×2 (dev + test), dialyzer, credo --all, sobelow, and the test suite under the 60s cap (1755 passed, 91.2%).

🤖 Generated with Claude Code

Codecov's default target is "auto", meaning the project's own current coverage,
so a commit went red unless its diff was covered at least as well as the whole
tree already is. 0.6.6 failed exactly that way — "88.07% of diff hit (target
91.13%)" — while being perfectly well tested.

An auto target also ratchets: every commit that raises coverage raises the bar
for the next one, until any ordinary change is red. Pin it instead. 80% is the
bar a commit has to clear, for the diff and for the project; the tree currently
sits at 91.2%, so this is headroom rather than a loosened gate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@daniboybye
daniboybye merged commit 3f8287b into master Aug 28, 2026
4 checks passed
@daniboybye
daniboybye deleted the ci/codecov-80 branch August 28, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant